package club.itstudio.IContainer.util;

import com.fasterxml.jackson.annotation.JsonInclude;

public class ResultUtil {
    public static Result success(int status, String message, Object data) {
        return new Result(status, message, data);
    }

    public static Result success(String message) {
        return success(200, message, null);
    }

    public static Result success(Object data) {
        return success(200, "success", data);
    }

    public static Result success(){
        return success(200, "success", null);
    }

    public static Result error(int status, String message, Object data) {
        return new Result(status, message, data);
    }

    public static Result error(int status, String message) {
        return error(status, message, null);
    }

    public static Result error(String message) {
        return error(400, message, null);
    }
}

